<?php  echo $this->callElement("default/tools/tool_bar",array("buttons"=>array(array('type'=>'back')) ,"title" => "appRain Update Manager")); ?>

		
		
<?php if( $state == "start" ):?>
		<div id="log_update">
			<div class="loading" id="log_signal">&nbsp;</div>
			<ol class="display_log"></ol>
		</div>
		<div id="form_check_update" method="post" action="<?php echo $this->baseurl("/developer/update");?>">
		<ul>
			<li style="text-align:center">
                <?php if( $newversion != 'NoUpdateAvailable'):?>
                    The followng command will add/replace/delete some core file of appRain.<br />
                    You may loose codeing if you have done that in core apprain filese. <br /><br /> 
                    <strong>Are you sure to continue update ?</strong> <br /><br />
                    <input type="submit" id="continue_update" class="app_button" value="Yes! Contiune update" /> <input type="submit" id="cancel_update" class="app_button" value="No! Get Me out from here" />
                <?php else:?>
                    <strong>No New Update Available for this version ?</strong> <br /><br />
                <?php endif;?>
			</li>
		</ul>
	</div>
<?php else:?>

	<?php echo App::Load("Helper/Javascript")->validation_map(array('_errBg'=>ERROR_BACKGROUND,'_dflBg'=>DEFAULT_BACKGROUND,'_autoSubmit'=>'false','_errToolTips'=>'false')); ?>
	<?php echo App::Load("Helper/Javascript")->ajax_submit(array("form_name"=>"#form_check_update","debug"=>"true","auto_hide"=>"true","message_element"=>".message_update")); ?>
	
	<form id="form_check_update" style="background-color:#FFF" class="app_validation" method="post" action="<?php echo $this->baseurl("/developer/update");?>">
		<ul>
			<li style="text-align:center">
				<div class="message_update" style="padding:4px;">&nbsp;</div>

               <?php if( $newversion != 'NoUpdateAvailable'):?>
                    New update available in appRain release on your present version <?php echo app::__def()->sysConfig('APPRAINVERSION');?>.
                <?php else:?>
                    <strong>No New Update Available for this version</strong>
                <?php endif;?>

				
				<br /><br />
				You Apprain License Key: <input id="licensekey" class="sys-conf-input check_notempty" type="text" name="data[Update][licensekey]" value="<?php echo app::__def()->sysConfig('APPRAINLICENSEKEY');?>" class="app_input" size="35" /><br />
				<br />
				<input type="submit" class="app_button" value="Check Update" />
			</li>
		</ul>
	</form>
<?php endif;?>
	
<?php  echo $this->callElement("default/tools/tool_bar",array("buttons"=>array(array('type'=>'back') ) ,"position" => 'bottom')); ?>
